package org.example.pojo;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户信息
 */
public class User {

    private Integer id;

    private String name;//用户名

    private String openId;//对应绑定的微信账号

    private String phone;//手机号

    private String sex;//性别 gender

    private String idNumber;//身份证号

    private String avatar;//头像

    private LocalDateTime createTime;//创建时间


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    /**
     * 用户信息
     * @TableName user
     */
    public static class user implements Serializable {
        /**
         * 主键
         */
        private Long id;

        /**
         * 微信用户唯一标识
         */
        private String openid;

        /**
         * 姓名
         */
        private String name;

        /**
         * 手机号
         */
        private String phone;

        /**
         * 性别
         */
        private String sex;

        /**
         * 身份证号
         */
        private String idNumber;

        /**
         * 头像
         */
        private String avatar;

        /**
         *
         */
        private LocalDateTime createTime;

        private static final long serialVersionUID = 1L;

        /**
         * 主键
         */
        public Long getId() {
            return id;
        }

        /**
         * 主键
         */
        public void setId(Long id) {
            this.id = id;
        }

        /**
         * 微信用户唯一标识
         */
        public String getOpenid() {
            return openid;
        }

        /**
         * 微信用户唯一标识
         */
        public void setOpenid(String openid) {
            this.openid = openid;
        }

        /**
         * 姓名
         */
        public String getName() {
            return name;
        }

        /**
         * 姓名
         */
        public void setName(String name) {
            this.name = name;
        }

        /**
         * 手机号
         */
        public String getPhone() {
            return phone;
        }

        /**
         * 手机号
         */
        public void setPhone(String phone) {
            this.phone = phone;
        }

        /**
         * 性别
         */
        public String getSex() {
            return sex;
        }

        /**
         * 性别
         */
        public void setSex(String sex) {
            this.sex = sex;
        }

        /**
         * 身份证号
         */
        public String getIdNumber() {
            return idNumber;
        }

        /**
         * 身份证号
         */
        public void setIdNumber(String idNumber) {
            this.idNumber = idNumber;
        }

        /**
         * 头像
         */
        public String getAvatar() {
            return avatar;
        }

        /**
         * 头像
         */
        public void setAvatar(String avatar) {
            this.avatar = avatar;
        }

        /**
         *
         */
        public LocalDateTime getCreateTime() {
            return createTime;
        }

        /**
         *
         */
        public void setCreateTime(LocalDateTime createTime) {
            this.createTime = createTime;
        }

        @Override
        public boolean equals(Object that) {
            if (this == that) {
                return true;
            }
            if (that == null) {
                return false;
            }
            if (getClass() != that.getClass()) {
                return false;
            }
            user other = (user) that;
            return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getOpenid() == null ? other.getOpenid() == null : this.getOpenid().equals(other.getOpenid()))
                && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
                && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
                && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
                && (this.getIdNumber() == null ? other.getIdNumber() == null : this.getIdNumber().equals(other.getIdNumber()))
                && (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
        }

        @Override
        public int hashCode() {
            final int prime = 31;
            int result = 1;
            result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
            result = prime * result + ((getOpenid() == null) ? 0 : getOpenid().hashCode());
            result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
            result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
            result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
            result = prime * result + ((getIdNumber() == null) ? 0 : getIdNumber().hashCode());
            result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
            result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
            return result;
        }

        @Override
        public String toString() {
            StringBuilder sb = new StringBuilder();
            sb.append(getClass().getSimpleName());
            sb.append(" [");
            sb.append("Hash = ").append(hashCode());
            sb.append(", id=").append(id);
            sb.append(", openid=").append(openid);
            sb.append(", name=").append(name);
            sb.append(", phone=").append(phone);
            sb.append(", sex=").append(sex);
            sb.append(", idNumber=").append(idNumber);
            sb.append(", avatar=").append(avatar);
            sb.append(", createTime=").append(createTime);
            sb.append(", serialVersionUID=").append(serialVersionUID);
            sb.append("]");
            return sb.toString();
        }
    }
}
